<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <input type="text" v-model="info">
    <!--v-on:事件名="方法名"  事件绑定-->
    <input type="button" value="按钮1" v-on:click="f()">
    <input type="button" value="按钮2" @click="f">

</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
    let v = new Vue({
        el:"div",
        data:{
            info:"请输入内容"
        },
        methods:{
            f(){
                alert(v.info)
            }
        }
    })


</script>
</body>
</html>